<?php

abstract class Domain51_Model_Mapper
{
    protected $_modelName = '';
    protected $_metaData = null;
    
    /**
     * @todo make modelName prefix configurable
     */
    public function __construct($modelName) {
        $this->_modelName = 'Domain51_App_' . ucfirst(strtolower($modelName)) . '_Model';
        $this->_init();
    }
    
    protected function _init()
    {
        $metaName = $this->_modelName . '_Meta';
        $this->_metaData = Solar::factory($this->_modelName . '_Meta');
    }
    
    abstract public function fetchById($id);
    
    abstract public function save(Domain51_Model_Abstract $model);
}

?>